<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:63:"D:\www\fdc\public/../application/manage\view\weimusic\edit.html";i:1491639814;s:63:"D:\www\fdc\public/../application/manage\view\public\header.html";i:1490355172;s:63:"D:\www\fdc\public/../application/manage\view\public\footer.html";i:1474280020;}*/ ?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="__CSS__/style.css" rel="stylesheet"/>
	<title>管理中心</title>

</head>

<body>
<div id="J_ajax_loading" class="ajax_loading">加载中...</div>

<div class="subnav">
    <div class="content_menu ib_a blue line_x">
        <?php if(!empty($sub_menu) OR !empty($big_menu)): if(!(empty($big_menu) || (($big_menu instanceof \think\Collection || $big_menu instanceof \think\Paginator ) && $big_menu->isEmpty()))): if(isset($normal)): ?>
        <a class="add fb" href="<?php echo $big_menu['iframe']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php else: ?>
    	<a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo $big_menu['iframe']; ?>" data-title="<?php echo $big_menu['title']; ?>" data-id="<?php echo $big_menu['id']; ?>" data-width="<?php echo $big_menu['width']; ?>" data-height="<?php echo $big_menu['height']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php endif; endif; if(!(empty($sub_menu) || (($sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator ) && $sub_menu->isEmpty()))): if(is_array($sub_menu) || $sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key;if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo $val['url']; ?>" class="<?php echo $val['class']; ?>"><em><?php echo $val['name']; ?></em></a>
        <?php endforeach; endif; else: echo "" ;endif; endif; endif; ?>
    </div>
</div>

<form id="info_form" action="<?php echo url('editDo'); ?>" method="post" enctype="multipart/form-data">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">基本信息</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="120">所属分类 :</th>
						<td>
							<select class="J_cate_select mr10" data-pid="0" data-menuid="4" data-uri="<?php echo url('Linkmenu/ajaxGetchilds'); ?>" data-selected="<?php echo $selected_ids; ?>"></select>
							<input type="hidden" name="cate_id" id="J_cate_id" value="" />
						</td>
					</tr>
					<tr>
						<th>标题 :</th>
						<td>
							<input type="text" name="title" id="J_title" class="input-text" value="<?php echo $info['title']; ?>" size="50">
						</td>
					</tr>


					<tr>
						<th>播放地址:</th>
						<td>
							<input type="text" name="url" id="J_img" class="input-text fl mr10" value="<?php echo $info['url']; ?>" size="40"/>
							&nbsp;&nbsp; <div id="J_upload_img" class="upload_btn"><span>上传</span></div><span>可填写外链地址</span>
						</td>
					</tr>

					<tr>
						<th>热门 :</th>
						<td>
							<label><input type="radio" name="hot" class="radio_style" value="1" <?php if($info['hot'] == 1): ?>checked<?php endif; ?>> 是 </label>&nbsp;&nbsp;
							<label><input type="radio" name="hot" class="radio_style" value="0" <?php if($info['hot'] == 0): ?>checked<?php endif; ?>> 否</label>
						</td>
					</tr>
					<tr>
						<th>状态 :</th>
						<td>
							<label><input type="radio" name="status" class="radio_style" value="1" <?php if($info['status'] == 1): ?>checked<?php endif; ?>> 启用 </label>&nbsp;&nbsp;
							<label><input type="radio" name="status" class="radio_style" value="0" <?php if($info['status'] == 0): ?>checked<?php endif; ?>> 禁用</label>
						</td>
					</tr>
				</table>
			</div>

        </div>
		<div class="mt10"><input type="submit" value="提交" id="dosubmit" name="" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
<input type="hidden" name="id" id="id" value="<?php echo $info['id']; ?>" />
</form>
<script src="__PUBLIC__/js/jquery.min.1.7.2.js"></script>
<script src="__JS__/manage.js"></script>
<script src="__JS__/admin.js"></script>
<script>
//初始化弹窗
(function (d) {
    d['okValue'] = '确定';
    d['cancelValue'] = '取消';
    d['title'] = '标题';
})($.dialog.defaults);
</script>
<script src="__PUBLIC__/js/plugins/formvalidator.js"></script>
<?php if(isset($list_table)): ?>
<script src="__PUBLIC__/js/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script>
<?php endif; ?>
<script src="__PUBLIC__/js/plugins/fileuploader.js"></script>
<script>
	$('.J_cate_select').cate_select();
$(function() {
    $.formValidator.initConfig({formid:"info_form",autotip:true});
    $("#J_title").formValidator({onshow:'请填写标题',onfocus:'请填写标题'}).inputValidator({min:1,onerror:'请填写标题'}).defaultPassed();;
    $("#J_cate_id").formValidator({onshow:'请选择分类',onfocus:'请选择分类'}).regexValidator({regexp:"intege1",datatype:"enum",onerror:"请选择分类"}).defaultPassed();;

});
	var img_uploader = new qq.FileUploaderBasic({
		allowedExtensions: ['mp3'],
		button: document.getElementById('J_upload_img'),
		multiple: false,
		action: "<?php echo url('Weimusic/ajaxUploadImg'); ?>",
		inputName: 'img',
		forceMultipart: true, //用$_FILES
		showMessage: function(message){
			$.yingloujie.tip({content:message, icon:'error'});
		},
		onSubmit: function(id, fileName){
			$('#J_upload_img').addClass('btn_disabled').find('span').text('上传中...');
		},
		onComplete: function(id, fileName, result){
			$('#J_upload_img').removeClass('btn_disabled').find('span').text('上传');
			if(result.status == '1'){
				$('#J_img').val('http://<?php echo config("url_domain_root"); ?>'+result.data);
			} else {
				$.yingloujie.tip({content:result.msg, icon:'error'});
			}
		}
	});
</script>

</body>
</html>